With the development and popularization of the mobile communication, people's demands for a real-time multimedia application service become more and more urgent. For this purpose, a CDMA0-EVDO mobile communication system brings in a multithread application, so as to support the real-time multimedia application service based on Quality of Service (QoS). In this mobile communication system, each user can create multiple Radio Link Protocol (RLP) streams on the application layer. In order to identify which stream an RLP message belongs to, each RLP stream needs to be configured with RLPID and RLPIDLength attributes. In the above, the RLPID is represented as a binary code field, and the RLPIDLength indicates the number of bits of the binary code corresponding to the RLPID.
Refer to FIG. 1 for the schematic diagram of an RLP message. The high RLPIDLength bits of an RLP message header (Header) is the RLPID field, and the RLP message header also includes: a Sequence Number and effective payload (Payload). When an Access Terminal or an Access Network receives the RLP message, if the RLPID field in the RLP message header matches with the RLPID attribute of a certain stream, then the message belongs to this stream.
To make such identification manner unique, the RLPID of all streams shall satisfy the following condition: any RLPID is not the prefix of another RLPID.
In addition, in the actual application, considering that the size of RLPIDLength will affect indirectly the rate for transmitting or receiving a message on a stream, this parameter needs to be configured according to the requirements of the operator. Therefore, it is expected in the industry that a group of RLPIDs can be constructed according to a group of given RLPIDLengths, and the group of RLPIDs construct a prefix code, so as to meet the requirements of the rate for transmitting or receiving messages in the actual application.
The famous Huffman Coding is a method for constructing prefix codes, which constructs a group of prefix codes with the shortest average code length by constructing an optimal binary tree. However, as for the above mentioned prefix code application in the mobile communication, this algorithm has the following problem: it can construct a group of prefix codes with the shortest average code length according to a given probability distribution, but it cannot construct, according to a group of given code lengths, the corresponding prefix codes. That is, the RLPIDs cannot be constructed according to the given RLPIDLengths through that method.